<template>
  <div>
    <h1>App count:{{ count }}</h1>

    <hr />
    <Child @add-one="addOne" @addn="addN" />
  </div>
</template>

<script>
  import Child from "./components/Child.vue";
  export default {
    name: "App",
    components: {
      Child,
    },
    data() {
      return {
        count: 1,
      };
    },
    methods: {
      addOne() {
        this.count++;
      },
      addN(n) {
        this.count += n;
      },
    },
  };
</script>

<style></style>
